
/**
 * Created by luoyang on 2018/1/11.
 */
import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
/****************平台**************/
import user from './views/platform/user.vue'
import platformaccountrecord from './views/platform/platformaccountrecord.vue'
import userloginlog from './views/platform/userloginlog.vue'
import provincialinformation from './views/platform/provincialinformation.vue'
import countpProfitRate from "./views/count/countpProfitRate";

import operators from './views/platform/operators.vue'
import businesstype from './views/platform/businesstype.vue'
import sysconfig from './views/platform/sysconfig.vue'
import blacklist from "./views/platform/blacklist";
import discount from "./views/platform/discount";
// import flowpool from './views/platform/flowpool.vue'
import downproductcode from './views/down/downproductcode.vue'
import channelpackage from './views/platform/channelpackage.vue'
import testproduct from './views/platform/testproduct.vue'
import school from './views/education/school.vue'
import mobile from './views/platform/mobile.vue'
import manualOrder from './views/platform/manualOrder'

import mobileaccount from './views/crowdfunding/mobileaccount.vue'
import crowdfunding from './views/crowdfunding/crowdfunding.vue'


/****************上游**************/
import upshopinfo from './views/up/upshopinfo.vue'
import upshoppro from './views/up/upshoppro.vue'
import uprecordCount from "./views/up/uprecordCount";
import uporder from './views/up/uporder.vue'
import uporderrefund from './views/up/uporderrefund.vue'
import batchupproduct from './views/up/batchupproduct.vue'
import upproductlog from './views/up/upproductlog.vue'
import debitUplog from './views/up/debitUplog.vue'
import uporderlog from './views/up/uporderlog.vue'
import uprechargerecord from './views/up/uprechargerecord.vue'
import downProductMatch from './views/up/downProductMatch.vue'
import downbillUp from "./views/up/downbillUp";
import exportlistUp from "./views/up/exportlistup.vue"
/****************下游**************/
import downshopinfo from './views/down/downshopinfo.vue'
import downshopproduct from './views/down/downshopproduct.vue'
import batchdownshopproducts from './views/down/batchdownshopproducts.vue'
import downrechargeflow from './views/down/downrechargeflow.vue'
import downorderrefund from './views/down/downorderrefund.vue'
import downorderlog from './views/down/downorderlog.vue'
import debitlog from './views/down/debitlog.vue'
import downprolog from './views/down/downprolog.vue'
import downrechargerecord from './views/down/downrechargerecord.vue'
import downrechargerecordcount from './views/down/downrechargerecordCount.vue'
import countBill from './views/count/countBill.vue'
import zerobalance from './views/down/zerobalance.vue'
import testproductDown from './views/down/testproduct.vue'
import downbill from "./views/down/downbill";
import matchingstrategy from "./views/down/matchingstrategy.vue";
import exportlist from "./views/down/exportlistdown.vue"
import producttimer from "./views/down/producttimer.vue";

/**********************电子卷********************/
import account from './views/electronic/account.vue'
import elerecord from './views/electronic/elerecord.vue'
// import commission from './views/electronic/commission.vue'
// import comrecord from './views/electronic/comrecord.vue'
import rechargetask from './views/electronic/rechargetask.vue'

/*************************count*****************************/
import CountUp from './views/count/countup.vue'
import CountDown from './views/count/countdown.vue'
import CountProfit from './views/count/countprofit.vue'
import CountUpFlow from './views/count/countUpFlow.vue'
import countDownFlow from './views/count/countDownFlow.vue'
import countDownProfit from "./views/count/countDownProfit";
import findDownOrderCount from './views/count/findDownOrderCount'

import broadband from './views/broadband/broadband.vue'
import broadbandinfo from './views/broadband/broadbandinfo.vue'


/*************************虚拟*****************************/
import virtualorder from './views/virtual/virtualorder.vue'
import cachephone from './views/virtual/cachephone.vue'
import virtualsum from './views/virtual/virtualsum.vue'
/*************************慢充*****************************/
import slowlist from './views/slow/slowlist.vue'
import sloworder from './views/slow/sloworder.vue'

import weixinslow from './views/weixinrecharge/weixinslow.vue'
import weixinproduct from './views/weixinrecharge/weixinproduct.vue'
import rechargecity from './views/weixinrecharge/rechargecity.vue'
/*************************移动*****************************/

import numberpool from './views/mobile/numberpool.vue'
import rechargeorder from './views/mobile/rechargeorder.vue'
import gameorder from './views/mobile/gameorder.vue'


const routerView = {
    role:[
        {
            path: '/login',
            component: Login,
            hidden: true,
            name: '',
        },
         {
            path: '/',
            component: Home,
            name: '平台管理',
            iconCls: 'el-icon-menu',//图标样式class
            hidden: false,
            children: [
                { path: '/user', component: user, name: '用户查询' },
                // { path: '/platformaccountrecord', component: platformaccountrecord, name: '平台资金变动记录' },
                // { path: '/userloginlog', component: userloginlog, name: '用户登录日志' },
                { path: '/provincialinformation', component: provincialinformation, name: '省份信息'},
                // { path: '/operators', component: operators, name: '运营商'},
                { path: '/businesstype', component: businesstype, name: '业务类型'},
                { path: '/channelpackage', component: channelpackage, name: '通道面值配置'},
                { path: '/testproduct', component: testproduct, name: '手工充值'},
                { path: '/manualOrder', component: manualOrder, name: '批量管理'},
                { path: '/sysconfig', component: sysconfig, name: '系统配置'},
                { path: '/mobile', component: mobile, name: '号段管理'},
                { path: '/blacklist', component: blacklist, name: '黑名单'},
                { path: '/discount', component: discount, name: '折扣查询'},
                // { path: '/downproductcode', component: downproductcode, name: '分销商业务编码'},
            ]
        },{
            path: '/',
            component: Home,
            name: '供货商管理',
            iconCls: 'el-icon-menu',
            // hidden: JSON.parse(sessionStorage.getItem("user")) != null ? JSON.parse(sessionStorage.getItem("user")).usertype == 1 ? false : true : true,
            hidden: false,
            children: [
                { path: '/upshopinfo', component: upshopinfo, name: '供货商信息' },
                { path: '/uprechargerecord', component: uprechargerecord, name: '充值记录' },
                { path: '/uprecordCount', component: uprecordCount, name: '充值统计'},
                // { path: '/upshoppro', component: upshoppro, name: '供货商产品' },
                { path: '/batchupproduct', component: batchupproduct, name: '产品配置' },
                { path: '/uporder', component: uporder, name: '订单管理' },
                { path: '/downProductMatch', component: downProductMatch, name: '产品查询' },
                { path: '/uporderlog', component: uporderlog, name: '订单日志' },
                { path: '/uporderrefund', component: uporderrefund, name: '退款记录' },
                { path: '/debitUplog', component: debitUplog, name: '扣款记录' },
                { path: '/upproductlog', component: upproductlog, name: '产品操作日志' },
                { path: '/downbillUp', component: downbillUp, name: '对账单' },
                { path: '/exportlistUp', component: exportlistUp, name: '导出列表' },
                // { path: '/uperrorcode', component: uperrorcode, name: '渠道错误码' }
            ]
        }, {
            path: '/',
            component: Home,
            name: '分销商管理',
            iconCls: 'el-icon-menu',
            // hidden: false,
            hidden: false,
            children: [
                { path: '/downshopinfo', component: downshopinfo, name: '分销商信息' },
                { path: '/downrechargerecord', component: downrechargerecord, name: '充值记录'},
                { path: '/downrechargerecordcount', component: downrechargerecordcount, name: '充值统计'},
                // { path: '/downshopproduct', component: downshopproduct, name: '分销商产品' },
                { path: '/batchdownshopproducts', component: batchdownshopproducts, name: '产品配置' },
                { path: '/producttimer', component: producttimer, name: '调价记录' },
                { path: '/matchingstrategy', component: matchingstrategy, name: '配置查询' },
                { path: '/downrechargeflow', component: downrechargeflow, name: '充值订单' },
                { path: '/downorderlog', component: downorderlog, name: '订单日志' },
                { path: '/downorderrefund', component: downorderrefund, name: '退款记录' },
                { path: '/debitlog', component: debitlog, name: '扣款记录' },
                { path: '/downprolog', component: downprolog, name: '产品日志' },
                { path: '/zerobalance', component: zerobalance, name: '零点余额' },
                { path: '/downbill', component: downbill, name: '对账单' },
                { path: '/exportlist', component: exportlist, name: '导出列表' },
                // { path: '/downerrorcode', component: downerrorcode, name: '渠道错误码' }
            ]
        },
        // {
        //     path: '/',
        //     component: Home,
        //     name: '移动订单',
        //     iconCls: 'el-icon-menu',//图标样式class
        //     hidden: false,
        //     children: [
        //         { path: '/numberpool', component: numberpool, name: '号码池' },
        //         { path: '/rechargeorder', component: rechargeorder, name: '充值订单' },
        //         { path: '/gameorder', component: gameorder, name: '外部订单' }
        //     ]
        // },
        // {
        //     path: '/',
        //     component: Home,
        //     name: '和教育',
        //     iconCls: 'el-icon-menu',//图标样式class
        //     hidden: false,
        //     children: [
        //         { path: '/school', component: school, name: '学校管理' },
        //
        //     ]
        // },
        // {
        //     path: '/',
        //     component: Home,
        //     name: '流量众筹',
        //     iconCls: 'el-icon-menu',//图标样式class
        //     children: [//hidden: JSON.parse(sessionStorage.getItem("user")) != null ? JSON.parse(sessionStorage.getItem("user")).usertype == 2 ? false : true : true,
        //         { path: '/mobileaccount',  component: mobileaccount, name: '账号管理' },
        //         { path: '/crowdfunding', component: crowdfunding, name: '众筹订单' },
        //     ]
        // },
        {
            path: '/',
            component: Home,
            name: '电子卷',
            iconCls: 'el-icon-menu',//图标样式class
            hidden: false,
            children: [
                { path: '/account', component: account, name: '电子卷账号' },
                { path: '/rechargetask', component: rechargetask, name: '充值金额限制' },
                { path: '/elerecord', component: elerecord, name: '充值记录' },
                // { path: '/commission', component: commission, name: '佣金' },
                // { path: '/comrecord', component: comrecord, name: '佣金变更记录' },
            ]
        },
        // {
        //     path: '/',
        //     component: Home,
        //     name: '虚拟订单',
        //     iconCls: 'el-icon-menu',//图标样式class
        //     hidden: false,
        //     children: [
        //         { path: '/virtualorder', component: virtualorder, name: '充值订单' },
        //         { path: '/virtualsum', component: virtualsum, name: '订单统计' },
        //         { path: '/cachephone', component: cachephone, name: '导入号码' }
        //
        //     ]
        // },
        // {
        //     path: '/',
        //     component: Home,
        //     name: '骑士卡订单',
        //     iconCls: 'el-icon-menu',//图标样式class
        //     hidden: false,
        //     children: [
        //         { path: '/slowlist', component: slowlist, name: '订单导入' },
        //         { path: '/sloworder', component: sloworder, name: '支付明细' }
        //     ]
        // },
        {
            path: '/',
            component: Home,
            name: '骑士卡订单',
            iconCls: 'el-icon-menu',//图标样式class
            hidden: false,
            children: [
                { path: '/weixinproduct', component: weixinproduct, name: '慢充产品配置' },
               // { path: '/rechargecity', component: rechargecity, name: '充值地市配置' },
                { path: '/weixinslow', component: weixinslow, name: '订单明细' }
            ]
        },
        {
            path: '/',
            component: Home,
            name: '统计',
            iconCls: 'el-icon-menu',
            // leaf: true,//只有一个节点
            // hidden: JSON.parse(sessionStorage.getItem("user")) != null ? (JSON.parse(sessionStorage.getItem("user")).usertype == 1 || JSON.parse(sessionStorage.getItem("user")).usertype == 2) ? false : true : true,
            hidden: false,
            children: [
                // { path: '/countdown', component: CountDown, name: '分销商统计' , hidden: false,},
                // { path: '/countup', component: CountUp, name: '供货商统计' , hidden: false,},
                { path: '/CountProfit', component: CountProfit, name: '利润统计' , hidden: false},
                { path: '/countpProfitRate', component: countpProfitRate, name: '利润率' , hidden: false,},
                { path: '/CountUpFlow', component: CountUpFlow, name: '供货商产品统计' , hidden: false,},
                { path: '/countDownFlow', component: countDownFlow, name: '分销商产品统计' , hidden: false,},
                { path: '/countDownProfit', component: countDownProfit, name: '分销商利润统计' , hidden: false,},
                { path: '/findDownOrderCount', component: findDownOrderCount, name: '三网统计' , hidden: false,},



                // { path: '/countBill', component: countBill, name: '分销商账单查询' , hidden: false,}
            ]
        },
        {
            path: '/404',
            component: NotFound,
            name: '',
            hidden: true
        },
        {
            path: '*',
            hidden: true,
            redirect: { path: '/404' }
        }
    ],
    customer: [
        {
            path: '/login',
            component: Login,
            name: '',
            hidden: true
        },
        {
            path: '/404',
            component: NotFound,
            name: '',
            hidden: true
        },
         {
            path: '/',
            component: Home,
            name: '分销商管理',
            iconCls: 'el-icon-menu',
            hidden: false,
            children: [
                { path: '/downshopinfo', component: downshopinfo, name: '分销商信息' },
                { path: '/downorderrefund', component: downorderrefund, name: '退款记录' },
                { path: '/downrechargerecord', component: downrechargerecord, name: '充值记录'},
                { path: '/downrechargeflow', component: downrechargeflow, name: '订单管理' },
                { path: '/countDownFlowProduct', component: countDownFlow, name: '订单统计' , hidden: false,},
                // { path: '/productDown', component: testproduct, name: '手工充值' },
                { path: '/zerobalance', component: zerobalance, name: '零点余额' },
                { path: '/exportlist', component: exportlist, name: '导出列表' },
                // { path: '/debitlog', component: debitlog, name: '扣款记录' },
            ]
        },
        {
            path: '*',
            hidden: true,
            redirect: { path: '/404' }
        }
    ],
    broadbandpage: [
        {
            path: '/login',
            component: Login,
            name: '',
            hidden: true
        },
        {
            path: '/404',
            component: NotFound,
            name: '',
            hidden: true
        },
        // {
        //     path: '/',
        //     component: Home,
        //     name: '宽带业务',
        //     iconCls: 'el-icon-menu',//图标样式class
        //     hidden: false,
        //     children: [
        //         { path: '/broadband', component: broadband, name: '宽带订单' }
        //     ]
        // },
        {
            path: '*',
            hidden: true,
            redirect: { path: '/404' }
        }
        ]
};
export  default  routerView;
